home *** CD-ROM | disk | FTP | other *** search
Wrap
global curDataChannel, animatedPropList, firstClip, theRecordingLayer, referenceFrameNum, curClipRecord, enterList, loopList, exitList, theStageBounds, theLayer, dispatchTable, frameLimit, foregroundFXSpr, backgroundFXSpr, autoHoldFrame, dirtyFlag on birth me return me end on moveRecordingSpr me, whichSpr, theMouseH, theMouseV set theMouseLoc to point(theMouseH, theMouseV) if the shiftDown then cursor(3) set the loc of sprite whichSpr to theMouseLoc else if inside(theMouseLoc, theStageBounds) then cursor(200) set the loc of sprite whichSpr to point(theMouseH, theMouseV) else cursor(-1) hideRecordingSpr(me, whichSpr) end if end if updateStage() end on setupClipData me set enterList to getAt(curClipRecord, 4) set loopList to getAt(curClipRecord, 5) set exitList to getAt(curClipRecord, 6) preloadClipData(me) if enterList <> [] then set firstClip to getAt(enterList, 1) else if loopList <> [] then set firstClip to getAt(loopList, 1) else set firstClip to getAt(exitList, 1) end if end if set the castNum of sprite theRecordingLayer to firstClip end on preloadClipData me if enterList <> [] then repeat with theCastNumber in enterList preLoadCast(theCastNumber) end repeat end if if loopList <> [] then repeat with theCastNumber in loopList preLoadCast(theCastNumber) end repeat end if if exitList <> [] then repeat with theCastNumber in exitList preLoadCast(theCastNumber) end repeat end if end on hideRecordingSpr me, whichSpr set the locH of sprite whichSpr to -1000 end on buildFilterList me set theFrameMap to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] set animatedPropList to [] set autoHoldFrame to copyList(getAt(scoreData, referenceFrameNum)) repeat with theChannelNumber = 1 to 12 if getAt(autoHoldFrame, theChannelNumber) <> EMPTY then setAt(theFrameMap, theChannelNumber, 1) end if end repeat set theType to getAt(curClipRecord, 1) if (theType <> "L") and (theType <> "N") then if (theLayer <> foregroundFXSpr) and (theLayer <> backgroundFXSpr) then setAt(theFrameMap, curDataChannel, 0) end if end if set theSlotCount to 1 repeat with theSlot in dispatchTable set theType to getAt(theSlot, 1) set theChannelNumber to getAt(theSlot, 3) if (theType = "P") or (theType = "S") then if theType = "S" then setAt(theFrameMap, theChannelNumber, 0) end if else setAt(autoHoldFrame, theChannelNumber, []) setAt(theFrameMap, theChannelNumber, 0) end if set theSlotCount to theSlotCount + 1 end repeat set theSlotCount to 1 repeat with theSlot in dispatchTable set theChannelNumber to getAt(theSlot, 3) if getAt(theFrameMap, theChannelNumber) = 1 then append(animatedPropList, theSlotCount) end if set theSlotCount to theSlotCount + 1 end repeat end on extendClips me repeat with theSlotNumber in animatedPropList set theSlot to getAt(dispatchTable, theSlotNumber) set theChannelNumber to getAt(theSlot, 3) set theSearchField to getAt(theSlot, 4) set theLineCount to the number of lines in field theSearchField set theSearchString to string(getAt(theSlot, 2)) repeat with theLineNumber = 1 to theLineCount if value(item 2 of line theLineNumber of field theSearchField) = theSearchString then set thePropClipRecord to value(line theLineNumber of field theSearchField) exit repeat end if end repeat if not voidp(thePropClipRecord) then set theLoopList to getAt(thePropClipRecord, 5) set theLoopCount to count(theLoopList) set theLoopNumber to 1 set referenceClip to copyList(getAt(getAt(scoreData, referenceFrameNum), theChannelNumber)) repeat with theFrameNumber = referenceFrameNum + 1 to count(scoreData) set newReferenceClip to copyList(referenceClip) setAt(newReferenceClip, 1, getAt(theLoopList, theLoopNumber)) setAt(getAt(scoreData, theFrameNumber), theChannelNumber, newReferenceClip) if theLoopNumber < theLoopCount then set theLoopNumber to theLoopNumber + 1 next repeat end if set theLoopNumber to 1 end repeat end if end repeat end on showOverFlowDialog me set theMessage to "Sorry, you cannot record more than " & frameLimit - 1 & " frames. The full version of Simpsons Cartoon Studio allows you to create cartoons of up to 1,200 frames." set theAlertBoxType to #OK showTheAlertBox(theMessage, theAlertBoxType, "nothing", "nothing", "nothing") end